const jsonServer = require("json-server");
const server = jsonServer.create();

const router = jsonServer.router("db.json");

server.use(jsonServer.defaults({ static: "./ui", watch: "true" }));

server.get("/users", (req, res,next) => {
  // res.send("hello!!");
  next();
});

server.use(router);

server.listen(3000, "0.0.0.0", () => {
  console.log("JSON Server is running");
});
